<template>
	<view class="content">
			<shopList  @payNow='payNow' @cancelPay='cancelPay' @service='' @couponCode='' @moreOne='' @feedback='' @deleteOrder = '' @contact='' @track='' @goDetails='' v-for='(item,index) in shopList' :param='item' :listStyle='listStyle'></shopList>
			<recommend @shopDetail='' @bayNow='' @share=''  v-for='(item,index) in recommend' :param='item'></recommend>
			<returndetail @returnDetail='' v-for='(item,index) in returnDetail' :param='item'></returndetail>
			<dialogview v-show="dialogFlag" @cancel="cancel" @confirm="confirm" :param="dialogView"></dialogview>
	</view>
</template>

<script>
	import shopList from '../../components/shopLst.vue';
	import recommend from '../../components/recommend.vue';
	import returndetail from '../../components/returnDetail.vue';
	import dialogview from '../../components/dialogView.vue';
	export default {
		components:{
			shopList,
			recommend,
			returndetail,
			dialogview,
		},
		data(){
			return {
				shopList: [11111,222222,3333,444],
				recommend:[1,2],
				returnDetail:[1,2,3],
				dialogView:{
					style:0,  // 弹出框的样式： 0 1 2
					title:'提示',//弹出层的标题
					content:'确定要这样做吗确定要这样做吗确定要这样做吗确定要这样做吗？',//弹出层的内容
					cancelText:'取消',//取消按钮的文本
					confirmText:'确认',//确认按钮的文本
					data:{code:1000}
				},
				dialogFlag:false,
				listStyle:0,//订单列表样式 0  订单详情样式1 下单页面样式 2
			}
		},
		onLoad() {

		},
		methods: {
            cancel:function(data){
				console.log(data)
				this.dialogFlag = false
			},
			confirm:function(data){
				console.log(data)
				this.dialogFlag = false
			},
			payNow:function(data){

				console.log(data);
				this.dialogView={
					style:2,  // 弹出框的样式： 0 1 2
					title:'提示',//弹出层的标题'
					content:'确定要这样做吗？',//弹出层的内容
					cancelText:'取消',//取消按钮的文本
					confirmText:'确认',//确认按钮的文本
					data:data
				}
				this.dialogFlag= true;
			},
			cancelPay:function(){
				
			}
		}
	}
</script>

<style scoped>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 0.5rem 0 2rem;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
